var express = require('express');
var path = require('path');
var router = express.Router();
var User = require('../models/users');

router.get('/', function(req, res, next) {
	console.log(req.session)
	req.session.destroy();
	res.send({
		state:1,
		msg:"登出成功"
	})
})

router.post('/', function(req, res, next) {
	delete global.name
	console.log(req.session)
	req.session.destroy();
	res.send({
		state:1,
		msg:"登出成功"
	})
})
module.exports = router;
